// var mongoose = require('mongoose');
// var mongoosePaginate = require('mongoose-paginate');

// var Schema =  mongoose.Schema;

// var ObjectId = Schema.ObjectId;

// var NewsSchema = new Schema({
// 	name:String,
// 	content:String,
// 	commentcount:String,
// 	date: { type: Date, default: Date.now },
// 	cateid:ObjectId
// })

// NewsSchema.plugin(mongoosePaginate);

// module.exports = mongoose.model('news',NewsSchema,'news');

var mongoose = require('mongoose');
var mongoosePaginate = require('mongoose-paginate');

var Schema = mongoose.Schema;
var ObjectId = Schema.ObjectId;
var UserSchema = new Schema({
	title:String,
	content:String,
	author:String,
	cateId:ObjectId,
	commentcount:String,	
	date: { type: Date, default: Date.now },
});

UserSchema.plugin(mongoosePaginate);


module.exports = mongoose.model('News',UserSchema,'news');